#!/bin/bash
# SPDX-License-Identifier: MulanPSL-2.0+
# Copyright (c) 2020 Huawei Technologies Co., Ltd. All rights reserved.

. ../defconfig.sh

load_cci_defaults

docker_rm initrd-http

cmd=(
	docker run
	--restart=always
	--name initrd-http
	-p ${INITRD_HTTP_PORT:-8800}:80
	-v /srv/initrd:/usr/share/nginx/html/initrd:ro
	-v /srv/kernel:/usr/share/nginx/html/kernel:ro
	-v /srv/upload-files:/usr/share/nginx/html/upload-files:ro
	-v /srv/cci:/usr/share/nginx/html/cci:ro
	-v /etc/localtime:/etc/localtime:ro
	-d
	initrd-http
)

"${cmd[@]}"
